package org.concepts.algorithm.sort;

/**
 * Implemented by classes that can sort an array.
 * 
 * @author vvvv
 * 
 * @param <E>
 */
public interface Sorter<E extends Number> {

  /**
   * Returns the sorted array. The input array is modified if the sorting
   * algorithm can do the work without creating a new array, i.e if the
   * algorithm is in place.
   * 
   * @param input
   *          input. This method is no-op if null is passed in.
   * @return null if null is passed in.
   */
  public E[] sort(E[] input);

}
